function obj=obj_para_all_delta(para, kappa, values_obs, logit_coef, X, y_init, options_y)


rho=exp(para(1));
change=exp(para(2))/(1+exp(para(2)));
change_2=exp(para(3))/(1+exp(para(3)));
delta=1+exp(para(4))/(1+exp(para(4)))*2;
zeta=exp(para(5:7));



y_temp=fminsearch(@(y) obj_y(y, rho, kappa, zeta, logit_coef, X), y_init, options_y);
y_solve_before=exp(y_temp);


y_temp=fminsearch(@(y) obj_y_delta(y, rho*(1+change), kappa, zeta, logit_coef, X, delta), y_init, options_y);
y_solve_after=exp(y_temp);


y_temp=fminsearch(@(y) obj_y_delta(y, rho*(1+change_2), kappa, zeta, logit_coef, X, delta), y_init, options_y);
y_solve_after_2=exp(y_temp);


obj=sum(sum(([y_solve_before; y_solve_after; y_solve_after_2]-values_obs).^2,2),1);


end